feat: SkillHub CLI — Agent Skills 包管理工具#300
Open
Rsweater wants to merge 69 commits intoiflytek:mainfrom
Open
Conversation
…port - Interactive agent selection for install/uninstall/list - Namespace search selection for unspecified namespace - --skill-version option to skip interactive selection - --from option for local/github source installation - Remove deprecated add command (use install --from instead) - Path-based grouping for uninstall results
e66a986 to
6c0d4f4
Compare
… and fixed status - Show '(default)' suffix when namespace is global (user didn't specify --namespace) - Display 'Status: Published' on success instead of 'undefined' - Keep output clean and informative for user feedback
- Use /api/v1/skills (compat API) when query is empty to get full stats - Map sort options: hot=rating, newest=newest, downloads=downloads - Remove vim-style k/j navigation to fix 'k' key input issue
… @seasoning/skillhub.
Features: - Add --sort option: hot (rating), newest (date), downloads (download count) - Use /api/v1/skills (compat API) for empty queries to get full download stats - Sort mapping: hot->rating, newest->newest, downloads->downloads Bug fixes: - Remove vim-style k/j navigation keys to fix 'k' character input issue - Fix undefined namespace/status display in publish output Testing: - Verify --sort downloads: openspec(102) > test-publish(46) > openspec[vision2group](11) > test(9) - Verify --sort hot: test-publish(2 stars) ranked first - Verify --sort newest: most recently updated first - Interactive mode: k key now inputs correctly
- Always display tags in publish output - Show changelog when --changelog flag is provided Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ion parsing - undici does not auto-follow HTTP redirects, manually follow 302/307/308 to MinIO presigned URL before piping response body - Commander.js parses --skill-version as skillVersion (camelCase), not skill-version (kebab-case), fix option access in install and download commands
Priority: SKILLHUB_REGISTRY env var > ~/.skillhub/config.json > default
…port - Add @types/unzipper for TypeScript support - Fix location header type assertion (string | string[] -> string) - Bump version to 1.0.5
… download stream completion - install: use actualSlug instead of raw slug in addToLock to prevent namespace doubling (vision2group/vision2group/slug) - update: remove hardcoded 'node dist/cli.mjs' fallback, rely on process.argv[1] which is always reliable - download: use finished() to ensure stream write completes before proceeding
- Replace all `npx clawhub` references with `npx motovis-skillhub` / `skillhub` - Update namespace separator from `--` to `/` in install commands - Change env var CLAWHUB_REGISTRY to SKILLHUB_REGISTRY - Add vite dev server plugin to serve /registry/skill.md - Update i18n strings (zh/en): ClawHub CLI → SkillHub CLI - Update skill.md/skill.md.template with new CLI commands - Update quick-start.tsx syntax highlighting and env config - Update e2e test assertions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ora spinner was still running during p.select() interactive prompt, causing the spinner to continuously overwrite the terminal and block the version selection UI. The user would see "Fetching..." stuck until pressing Enter. Stop spinner before p.select() and restart after selection completes.
… conflict - Stop spinner before runInteractiveSearch to prevent terminal UI conflict (same issue as version selection p.select) - Make spinner messages more specific: include skill name, version, path instead of generic "Fetching"/"Downloading"/"Extracting"
- Remove "还未发布" from .npmignore, add src/ to excludes - Add scripts/notify-feishu.sh for Feishu bot release notifications - Add scripts/release-cli.sh for one-click CLI release workflow
…iversalAgent - Add isUniversalForScope(agent, isGlobal) and getAgentTargetDir(agent, isGlobal) to agent-detector.ts - An agent is 'universal' when its target install dir equals the canonical .agents/skills directory - This fixes incorrect symlink skipping for agents like Codex/Cursor whose globalSkillsDir differs from .agents/skills (e.g. .codex/skills, .cursor/skills) - Update installer.ts to use dynamic check via optional AgentInfo parameter - Update install.ts to use getAgentTargetDir and pass agent info to installSkill - Update uninstall.ts to use isUniversalForScope for correct path resolution - Clean up unused isUniversalAgent import in list.ts
…l grouping - Move scope selection before agent selection in both installFromRegistry and installFromGit flows - Use isUniversalForScope in selectAgentsInteractive so that the Universal locked section correctly reflects the actual scope: - Project: agents with skillsDir='.agents/skills' (Cline, Codex, Cursor, etc.) - Global: agents with globalSkillsDir='.agents/skills' (Cline, Warp only) - Clean up unused getUniversalAgents/getNonUniversalAgents imports
- Sort universal and non-universal agent lists by name in selectAgentsInteractive - Exclude agents with showInUniversalList===false from locked section - Replace spinner.stop() with spinner.succeed() before interactive prompts to prevent 'Fetching' text from appearing as the step title - Also fix spinner.stop -> spinner.succeed for 'Installation complete'
Group agents that share the same install path into a single line. When more than 5 agents share a path, show first 5 names + count. Sort agent names alphabetically within each group. Extract buildInstallResultLines utility function to DRY up duplicate output logic in installFromRegistry and installFromGit.
d15c8de to
71bc00e
Compare
…help sections - Add interactive namespace selection to inspect command (like install) - Add version selection when multiple versions exist (--version to skip) - Skip version selection when --details is specified (shows all versions) - Add error handling for 403/404 errors with helpful messages - Add 'for installation' and 'for details' hints to explore command - Reorganize help: separate 'Discover & Info' and 'Social & Reviews' sections
71bc00e to
c7d4f82
Compare
- 重新组织帮助分类(Publish → Publish & Manage) - 统一参数命名为 <skill>,添加参数说明 - 简化 config 命令描述 - 优化 explore 帮助,添加选项分组和示例 - 修复参数重复显示问题 - 子命令帮助显示 Arguments 部分
将 inspect 命令的版本选项从 --version 改为 --skill-version, 避免与 skillhub --version 全局版本选项冲突
将 --from 描述改为 'Alias for --add',避免与 -a, --add 的 描述互相引用导致循环感
- 新建 skill-resolver.ts 公共函数,提供 resolveSkillNamespace 和 parseSkillNamespace - 为 resolve, download, star, rating, rate, report, delete, archive, hide, unhide 添加 --namespace 选项 - inspect 使用 resolveSkillNamespace 替代手动解析 - install 优化 --from 为主选项,-a, --add 为别名 - download 优化帮助界面,添加 Examples 和更清晰的描述
- download: 添加智能搜索 namespace 和交互式版本选择 - download: 修复下载失败仍创建文件的问题 - update: 重写为带版本对比的更新流程 - update: 添加 -y/--yes 选项跳过确认 - star/rating/rate/report/delete/archive/hide/unhide: 添加 404 友好错误提示 - 提示用户使用 namespace/skill-name 格式
## 后端修改 - 添加 RouteSecurityPolicyRegistry 权限配置(修复12个CLI命令403错误) - /api/v1/me/** - 用户个人相关 - /api/v1/notifications/** - 通知相关 - /api/v1/reviews/** - 审核相关 - /api/v1/skills/** POST/PUT - archive, rating, report - /api/v1/namespaces/** POST - transfer - DELETE /api/v1/skills/*/* - 改为所有者可删除 - AdminSkillController: hide/unhide 允许 SKILL_ADMIN - SkillDeleteController: delete 允许 SKILL_ADMIN - 新增 AdminAuditorController: 审计员专用控制器 ## CLI修改 - publish.ts: 修复 -v 选项冲突,改为只使用 --skill-version Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
08ecff8 to
9c353c5
Compare
8891a01 to
898325a
Compare
Collaborator
|
Hi @Rsweater,感谢你的贡献和对 SkillHub CLI 方向的关注! 这个 PR 的思路和我们内部正在推进的方向高度一致。我们目前已经有一份官方 SkillHub CLI 的设计 spec,正在按计划实现,会作为第一方工具集成进主仓库( 考虑到官方 CLI 已在开发中,我们暂时不会合并这个 PR,以避免维护两套并行实现带来的复杂度。但你的工作对我们很有参考价值,再次感谢你的投入! |
- Merge list and check into unified list command with status filtering - Add skill-status.ts core module for shared discovery logic - Unify interaction flow: scope -> agent -> status -> display - Replace -g/-p/-a flags with --scope option - Simplify check as alias for list --status managed,missing - Fix uninstall to properly handle 'All' scope selection - Display orphaned skills with [orphaned] marker in uninstall - Update help text and examples BREAKING CHANGE: Removed -g/--global, -p/--project, -a/--all flags from list command. Use --scope global|project|all instead.
Add unified permission model for skill lifecycle operations:
- Skill owners can hide/unhide/archive their own skills
- Namespace admins/owners can manage skills in their namespace
- Platform admins retain full access via admin endpoints
Changes:
- SkillGovernanceService: add permission checks to hideSkill/unhideSkill
- SkillLifecycleAppService: add hideSkill/unhideSkill methods
- GovernanceWorkflowAppService: add facade methods for hide/unhide
- SkillLifecycleController: add POST /{namespace}/{slug}/hide and /unhide endpoints
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Remove 'admin only' restriction from hide/unhide commands - Update API endpoint from admin path to portal path - Reorganize help categories: - Move rating to My Skills section - Create new Skill Lifecycle section (archive, hide, unhide) - Remove hide/unhide from Notifications & Admin Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…ories - Add 'me namespaces' subcommand to list accessible namespaces - Remove standalone 'namespaces' command from CLI - Rename 'My Skills' help section to 'My Profile' - Move namespaces listing under My Profile section Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…blish & Manage - Merge 'Skill Lifecycle' commands (archive, hide, unhide) into 'Publish & Manage' - Move 'reviews' from My Profile to Publish & Manage (related to publish workflow) - Rename section from 'Publish & Content' to 'Publish & Manage' Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Fix SkillStarController to use @RequestAttribute instead of @AuthenticationPrincipal - Fix SkillRatingController to use @RequestAttribute instead of @AuthenticationPrincipal - Fix SkillGovernanceService NPE when userNamespaceRoles is null - Update ApiTokenAuthenticationFilter to properly populate userNsRoles - Enhance error messages for 403 vs 401 status codes Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add platformRoles parameter to skill lifecycle methods: - hideSkill, archiveSkill, unhideSkill, unarchiveSkill, deleteVersion - Support SUPER_ADMIN and SKILL_ADMIN role bypass - Add hideSkillAsAdmin and unhideSkillAsAdmin for admin controllers - Fix userId null checks in rating and star controllers Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…nance methods All lifecycle methods (hideSkill, archiveSkill, unarchiveSkill, deleteVersion, unhideSkill) now accept a Set<String> platformRoles parameter for SUPER_ADMIN/ SKILL_ADMIN bypass. Updated all test calls to pass null for this parameter. AdminSkillControllerTest now mocks hideSkillAsAdmin instead of hideSkill.
… policies - Add require(skill:manage) for hide/unhide/archive/unarchive endpoints - Add allow (no scope) for social ops: star, rate, report, notifications - Update DeviceAuthService default scope to include skill:manage - Update TokenController default scope to include skill:manage
Contributor
Author
Hello @dongmucat, 非常感谢您的回复~ 虽然有点遗憾,但还是很期待官方的 CLI 发布的。 现已获悉这个情况~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(skillhub-cli): SkillHub CLI — Agent Skills 包管理工具
Summary
skillhub-cli 是 SkillHub 的命令行工具,基于 clawhub、skills 开发,用于发布、搜索、安装和管理 Agent Skills。现有issue中提到的命名空间、版本等问题均已解决,另外添加交互式引的搜索、安装skill等。
主要特性
技能中心注册
命令速查表
认证
搜索发现
安装管理
发布
社交
管理
全局选项
Source 类型与自动检测
registryns/slug格式gitowner/repo、github.com/...local./开头、/开头、~开头支持的 Agent:npx skills 支持的所有 agent
Universal Agents(通用路径
.agents/skills)Agent-Specific Path Agents
安装路径
~/.agents/skills/<repo>/.agents/skills/安装方式